
package uk.ac.cam.cl.oscar.Oscar_Mobile_Server;

import java.net.ServerSocket;
import java.net.Socket;
import java.io.IOException;

public class Main implements Runnable {
   
    public static void main(String[] args) {
        try{
            System.setProperty("com.sun.media.jai.disableMediaLib", "true");    
            ServerSocket ss = new ServerSocket(8000);
            System.out.printf("Listening on port 8000........%n");
            while(true){
                Socket s = ss.accept();
                System.out.printf("New Connection Accepted........%n");
                ImageProcessor ip = new ImageProcessor(s);
                Thread t = new Thread(ip);
                t.start();
            }
        }
        catch(IOException e){
            
        }

    }

    public void run() {
        main(null);
    }

}
